package bio;

import common.ProcessUtil;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.concurrent.TimeUnit;

/**
 * program: io-share 
 * author: bsworld.xie 
 * create: 2021-04-07 19:46 
 * description: 
 */
public class BioClient {
    public static void main(String[] args) throws IOException, InterruptedException {

        System.out.println("BioClient,当前进程pid是:" + ProcessUtil.getPid());
//        TimeUnit.SECONDS.sleep(20);
        Socket socket = new Socket();
        socket.connect(new InetSocketAddress("127.0.0.1", 2888));
        System.out.println("连接成功");
        TimeUnit.SECONDS.sleep(30);
//        socket.getOutputStream().write("hello".getBytes());
    }

}
